/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.home.tax.dao;

import java.util.List;
import org.hibernate.Criteria;

/**
 *
 * @author TIN Nguyen
 */
public interface Repository<INSTANCE_CLASS, PRIMARY_KEY_CLASS> {

    void saveOrUpdate(INSTANCE_CLASS instance);
    void delete(PRIMARY_KEY_CLASS id);
    INSTANCE_CLASS findById(PRIMARY_KEY_CLASS id);
    List<INSTANCE_CLASS> findAll();
    List<INSTANCE_CLASS> findAllByCriteria(Criteria criteria);
}
